broadway: Inherit frame clock from parent surface
authorAlexander Larsson <alexl@redhat.com>
Fri, 13 Mar 2020 14:26:22 +0000 (15:26 +0100)
committerAlexander Larsson <alexl@redhat.com>
Fri, 13 Mar 2020 14:26:22 +0000 (15:26 +0100)
gdk/broadway/gdksurface-broadway.c

index 9dcf3f14f1c1ed288998c2e11fdab07acdee3572..738d40c60625176687af25d1690dd637f4d14c24 100644 (file)
@@ -219,7 +219,10 @@ _gdk_broadway_display_create_surface (GdkDisplay     *display,
   GdkBroadwaySurface *impl;
   GType type;
 
-  frame_clock = _gdk_frame_clock_idle_new ();
+  if (parent)
+    frame_clock = g_object_ref (gdk_surface_get_frame_clock (parent));
+  else
+    frame_clock = _gdk_frame_clock_idle_new ();
 
   switch (surface_type)
     {